def unpickle(file):
    import pickle
    with open(file, 'rb') as fo:
        dict = pickle.load(fo, encoding='bytes')
    return dict


if __name__ == '__main__':
    file = './datasets/cifar-10-batches-py/data_batch_1'
    ret = unpickle(file)
    print(ret.keys())
    files = ret[b'filenames']
    print(type(ret))

    a = {b'tom': 32, b'jerry': 23, b'Sam': 55}
    print(a.keys())
    s = b'test'
    print(s)
    print(ord(s[-1]))
    s1 = 'test'
    print(ord(s1[-1]))
